package com.hezy.base.application;

import android.app.Application;
import android.content.res.Configuration;

import com.alibaba.android.arouter.launcher.ARouter;
import com.bumptech.glide.Glide;
import com.hezy.base.BuildConfig;

public class BaseComponentImpl extends IComponent {
    public BaseComponentImpl(Application application) {
        super(application);
    }

    @Override
    public void onCreate() {
        if (BuildConfig.DEBUG) {
            ARouter.openLog();
            ARouter.openDebug();
        }
        ARouter.init(application);
    }

    @Override
    public void onLowMemory() {

        Glide.get(application).onLowMemory();
    }

    @Override
    public void onTrimMemory(int level) {
        Glide.get(application).onTrimMemory(level);
    }

    @Override
    public void onConfigurationChanged(Configuration newConfig) {
        Glide.get(application).onConfigurationChanged(newConfig);
    }

    @Override
    public void onTerminate() {
    }
}
